{template 'header'}
<span id="carInfo" style="display: none" data-carId="{$carid}" data-modelId="{$modelid}" data-pictureId="{$pictureId}"></span>
<div class="auto-gal-wrap">
	<div class="auto-gal-top layout960 fn-clear">
		<div class="location fn-left">
			您当前的位置:
			<a href="{SITE_URL}" target="_blank">讯都车网</a>&nbsp;&nbsp;&gt;
			<a href="{url('auto/index')}" target="_blank">车型库</a>&nbsp;&nbsp;&gt;
			<a href="{url('auto/brand', 'brandId='.$brandId)}">{$brandName}</a>	&nbsp;>&nbsp;
			<a href="{url('auto/brand', 'manufactorId='.$manufactorId)}">{$manufactorName}</a>&nbsp;>&nbsp;
			<a href="{url('auto/car', 'carid='.$carid)}">{$carName}</a><a href="{url('auto/pictureShow', 'carid='.$carid)}">（图片）</a>
		</div>
		<div class="auto-sel fn-left">
			{if $modelid}
			<p><span>{$modelName[$amid]}</span><i class="auto-sel-down"></i></p>
			{else}
			<p><span>全部</span><i class="auto-sel-down"></i></p>
			{/if}
			<ul class="auto-options fn-hide">
				<li><a href="{url('auto/pictureShow', 'carid='.$carid)}">全部</a></li>
				{loop $modelName $amid $name}
				<li><a href="{url('auto/pictureShow', 'carid='.$carid.'&modelid='.$amid)}">{$name}</a></li>
				{/loop}
			</ul>
		</div>
	</div>
	<div id="autoPicture" class="layout960 fn-clear">
		<!--图片集start-->
		<div id="auto-gal" class="auto-galleria fn-left">
			<!--大图 start-->
			<div id="big-img" class="gal-bigimg">
				<div>
					<h2 class="auto-gal-title">{$pictureInfo[title]}</h2>
					<img src="{Picture::thumb($pictureInfo[imgurl],800,600)}" alt="2013款车型图片介绍"  />
				</div>
				<a href="javascript:void(0)" class="gal-pre" title="上一张"></a>
				<a href="javascript:void(0)" class="gal-next" title="下一张"></a>
			</div>
			<!--大图 end-->
			<!--缩略图 start-->
			<div class="gal-thumb-wrap fn-right">
				<div id="small-img" class="gal-thumb">
					<ul class="fn-clear">
					</ul>
				</div>
				<a class="gal-thumb-pre" title="上一页"></a>
				<a class="gal-thumb-next" title="下一页"></a>
			</div>
			<!--缩略图 end-->
		</div>
		<!--图片集end-->
		<div class="auto-gal-crumb fn-left">
			<div id="gal-cat" class="gal-cat">
				<ul>
					{loop $pictureCats $val}
					{if $val[num]!=0}
					<li id="picCat_{$val[arid]}">{$val[name]}<span>{$val[num]}</span></li>
					{/if}
					{/loop}
				</ul>
			</div>
			<div class="gal-pager"><span id="page">1</span>/<span id="len">0</span></div>
		</div>
	</div>
</div>
<script type="text/javascript">
    seajs.use(['$',"auto-gallery"],function($,Gallery){
        var autoGal = new Gallery("#big-img","#small-img");
        autoGal.init();

        var slideDown = false,
            $options = $(".auto-options");
        $("div.auto-sel").click(function() {
            if (slideDown) {
                $options.slideUp(100);
                slideDown = false;
            } else {
                $options.slideDown(100);
                slideDown = true;
            }
        });

        $options.find("li").each(function(index, element) {
            $(this).hover(function() {
                $(this).addClass("over").siblings().removeClass("over");
            });
            $(this).click(function() {
                var text = $(this).text();
                $options.addClass("fn-hide");
                $("div.auto-sel").find("span").text(text);
            });
        });
    })
</script>
<!--主体部分 end-->
{template 'footer'}
<!--主体部分 end-->